/*
 * Knight.cpp
 *
 *  Created on: Mar 30, 2011
 *      Author: cnwilson
 */

#include "../inc/Knight.h"


Knight::Knight(Color _color,Position _pos): Piece(_color,_pos,KNIGHT){

}

vector<Position> Knight::getPotentialMoves(){
	vector<Position> moves,temp;
	temp.push_back(pos+Position( 2, 1));
	temp.push_back(pos+Position( 2,-1));
	temp.push_back(pos+Position(-2,-1));
	temp.push_back(pos+Position(-2, 1));
	temp.push_back(pos+Position( 2,-1));
	temp.push_back(pos+Position( 2, 1));
	temp.push_back(pos+Position(-2,-1));
	temp.push_back(pos+Position(-2, 1));

	for(int i=0; i<temp.size();i++)
		if(temp[i]>=0 && temp[i]<BOARDSIZE)
			moves.push_back(temp[i]);
	return moves;
}
